#!/bin/sh
#
# Start script for any command

# Environment variables
JAVA_HOME=java

# Structure variables
varEXECUTEABLE=autotest.jar
varLIBDIRECTORY=lib
varCONFIGFILE=config/autotest.properties
varLOG4JCONFIGFILE=config/log4j/logging.properties

## Move to script directory
cd `dirname $0`

## Generate classpath
for FILE in `ls $varLIBDIRECTORY/**/*`
do
        varCLASSPATH="${varCLASSPATH}:${FILE}"
done

## Add application jar
varCLASSPATH="autotest.jar:${varCLASSPATH}"

## Run application
$JAVA_HOME -classpath $varCLASSPATH com.evolve.autotest.AutoTestCommandLine $varCONFIGFILE $varLOG4JCONFIGFILE
